package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(32)"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}
type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)"`
}
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}
type Node struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)"`
}
type Novel struct {
	gorm.Model
	Title  string `gorm:"type:varchar(50)"`
	Author string `gorm:"type:varchar(50)"`
	Desc   string `gorm:"type:varchar(50)"`
}

//////////////////////////////////////////////////////////////////

type Depot struct {
	gorm.Model
	DepotCode string `gorm:"type:varchar(30)"`
	DepotName string `gorm:"type:varchar(30)"`
	DepotType string `gorm:"type:varchar(30)"`
}
type Order struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(30)"`
	DepotId    int    `gorm:"type:int"`
	OrderPrice int    `gorm:"type:int"`
}
type DepotOrderList struct {
	OrderId    int
	OrderCode  string
	OrderPrice int
	DepotCode  string
	DepotName  string
	DepotType  string
}

// /////////////////////////

type Good struct {
	gorm.Model
	GoodName string `gorm:"type:varchar(30)"`
	GoodType string `gorm:"type:varchar(30)"`
	GoodDesc string `gorm:"type:varchar(30)"`
}
type GoodOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(30)"`
	OrderPrice int    `gorm:"type:int"`
	GoodId     int    `gorm:"type:int"`
}
type GoodOrderList struct {
	OrderId    int
	OrderCode  string
	OrderPrice int
	GoodName   string
	GoodType   string
	GoodDesc   string
}

///////////////////////////////////////////////////

type Courier struct {
	gorm.Model
	CourierCode  string `gorm:"type:varchar(30)"`
	CourierName  string `gorm:"type:varchar(30)"`
	CourierPhone string `gorm:"type:varchar(11)"`
}
type CourOrder struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(30)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	CourierId int    `gorm:"type:int"`
}
type CourierOrderList struct {
	OrderId      int
	OrderCode    string
	OrderTo      string
	CourierName  string
	CourierPhone string
}

//////////////////////////

type Car struct {
	gorm.Model
	CarName  string `gorm:"type:varchar(30)"`
	CarType  string `gorm:"type:varchar(30)"`
	CarPrice int    `gorm:"type:int"`
}
type CarOrder struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(30)"`
	PayType   string `gorm:"type:varchar(30)"`
	CarId     int    `gorm:"type:int"`
}
type CarOrderList struct {
	OrderId   int
	OrderCode string
	PayType   string
	CarName   string
	CarType   string
	CarPrice  int
}
